<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Map with zoom-in, zoom-out buttons and zoom on mousewheel</title>
    <style type="text/css">
        body {
            color: #5d5d5d;
            font-family: Helvetica, Arial, sans-serif;
        }

        h1 {
            font-size: 30px;
            margin: auto;
            margin-top: 50px;
        }

        .mapcontainer {
            max-width: 595.28px;
            margin: auto;
        }

        /* Specific mapael css class are below
         * 'mapael' class is added by plugin
        */

        .mapael .map {
            background-color: #cddee0;
            margin-bottom: 10px;
            position: relative;
        }

        /* For all zoom buttons */
        .mapael .zoomButton {
            background-color: #fff;
            border: 1px solid #ccc;
            color: #000;
            width: 15px;
            height: 15px;
            line-height: 15px;
            text-align: center;
            border-radius: 3px;
            cursor: pointer;
            position: absolute;
            top: 0;
            font-weight: bold;
            left: 10px;

            -webkit-user-select: none;
            -khtml-user-select : none;
            -moz-user-select: none;
            -o-user-select : none;
            user-select: none;
        }

        /* Reset Zoom button first */
        .mapael .zoomReset {
            top: 10px;
        }

        /* Then Zoom In button */
        .mapael .zoomIn {
            top: 30px;
        }

        /* Then Zoom Out button */
        .mapael .zoomOut {
            top: 50px;
        }

        .mapael .mapTooltip {
            position: absolute;
            background-color: #474c4b;
            moz-opacity: 0.70;
            opacity: 0.70;
            filter: alpha(opacity=70);
            border-radius: 10px;
            padding: 10px;
            z-index: 1000;
            max-width: 200px;
            display: none;
            color: #fff;
        }
    </style>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js" charset="utf-8"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js"
            charset="utf-8"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.2.7/raphael.min.js" charset="utf-8"></script>
    <script src="jquery.mapael.js" charset="utf-8"></script>
    <script src="../neimenggu_wushenqi.js" charset="utf-8"></script>


    <script type="text/javascript">
        $(function () {
            $(".mapcontainer").mapael({
                map: {
                    name: "svgmap"
                    // Enable zoom on the map
                    , zoom: {
                        enabled: true,
                        maxLevel: 10
                    }
                    // Set default plots and areas style
                    , defaultPlot: {
                        attrs: {
                            fill: "#004a9b"
                            , opacity: 0.6
                        }
                        , attrsHover: {
                            opacity: 1
                        }
                        , text: {
                            attrs: {
                                fill: "#505444"
                            }
                            , attrsHover: {
                                fill: "#000"
                            }
                        }
                    }
                    , defaultArea: {
                        attrs: {
                            fill: "#f4f4e8"
                            , stroke: "#ced8d0"
                        }
                        , attrsHover: {
                            fill: "#a4e100"
                        }
                        , text: {
                            attrs: {
                                fill: "#505444"
                            }
                            , attrsHover: {
                                fill: "#000"
                            }
                        }
                    }
                },
				plots:{
					"bottom": {
						latitude: 37.654586,
						longitude: 108.602161,
						tooltip: {
							content: "bottom"
						}
					},
                    "right": {
                        latitude: 38.939496,
                        longitude: 109.685302,
                        tooltip: {
                            content: "bottom"
                        }
                    }
				}
                
            });
			
			  $(".mapcontainer svg").click(function (e) {
			  	console.log("X:"+e.originalEvent.offsetX);
                console.log("Y:"+e.originalEvent.offsetY);
            });
        });
    </script>

</head>

<body>

    <div class="mapcontainer">
        <div class="map">
            <span>Alternative content for the map</span>
        </div>
    </div>

</body>
</html>